#ifndef MATRIX_H
#define MATRIX_H

#include <QDataStream>
#include <QDebug>

class Matrix
{
    int m_r;
    int m_c;

    qreal * m_data;
public:

    Matrix(int nRow,int nCol);
    Matrix(const Matrix& m);
    ~Matrix();

    int nRows() const;
    int nColumns() const;

    const qreal& operator() ( int row, int column ) const;
    qreal&	operator() ( int row, int column );

    void fill(qreal v);
    void loadIdentity();
    
signals:
    
public slots:
    
};

Matrix operator*(const Matrix& m1, const Matrix& m2);
QDataStream & operator<< ( QDataStream & stream, const Matrix & matrix );
QDebug operator<<(QDebug dbg, const Matrix &matrix);

#endif // MATRIX_H
